var util = {
    canvas: "",
    createTextbox(title, options) {   //文字
        this.canvas.createTextbox(title, options);
    },
    createRect(option) { //矩形

        this.canvas.createRect(option);
    },
    createEqualTriangle(options) {   //三角形
        this.canvas.createEqualTriangle(options);
    },
    createCircle(options) {  //圆
        this.canvas.createCircle(options);
    },
    createImage(image, options) { //图片

        this.canvas.createImage(image, options);
    },
    createLine(options) { //直线

        this.canvas.createLine(options);
    },
    drawDottedline(options) { //虚线

        this.canvas.drawDottedline(options);
    },
    drawArrowLine(options) {  //箭头
        this.canvas.drawArrowLine(options);
    },
    setBackgroundImage(obj) {
        this.canvas.setBackgroundImage(obj);
    },
    setBackgroundColor(color) {
        this.canvas.setBackgroundColor(color);
    },
    removeobj(obj) {
        this.canvas.remove(obj);
    },
    clear() {
        this.canvas.clear();
        this.canvas.setBackgroundColor("#d3dce6");

    },
    loadFromJSON(json) {
        this.canvas.loadFromJSON(json, function (data) {
            console.log("data", data);

        })
    }

}



module.exports = util;